using SqlSugar;

namespace JamesFan.FetchAreaCodes.Repository;

[SugarTable("AreaCode")]
internal class AreaCode {
    [SugarColumn(IsPrimaryKey = true, Length = 12)]
    public string? Id { get; set; }

    [SugarColumn(
        ColumnDataType = "char",
        Length = 12,
        IndexGroupNameList = new[] { nameof(Code) }
    )]
    public string? Code { get; set; }

    [SugarColumn(
        Length = 12,
        IndexGroupNameList = new[] { nameof(ParentId) }
    )]
    public string? ParentId { get; set; }

    [SugarColumn(
        Length = 128,
        IndexGroupNameList = new[] { nameof(Name) }
    )]
    public string? Name { get; set; }

    public uint Level { get; set; }
}
